// 类
class Student {
    constructor(name, number) {
        this.name = name
        this.number = number
    }
    sayHi () {
        console.log(`姓名：${this.name}，学号：${this.number}`)
    }
}

// 通过类 new 实例
const Tom = new Student("Tom", 1821 )
console.log(Tom.name)
console.log(Tom.number)
Tom.sayHi()
